/*
 * Copyright (c) 2008-2013 Haulmont. All rights reserved.
 * Use is subject to license terms, see http://www.cuba-platform.com/license for details.
 */

package com.haulmont.asu.entity;

import com.haulmont.chile.core.annotations.NamePattern;

import javax.persistence.*;

/**
 * Author: Sergey42
 * Date: 14.10.13 12:11
 */
@Table(name = "EXT_CORPORATION_PRESENTER")
@Entity(name = "ext$CorporationPresenter")
@DiscriminatorValue("C")
@PrimaryKeyJoinColumn(name = "PERSON_ID", referencedColumnName = "ID")
@NamePattern("%s|name")
public class CorporationPresenter extends Person {

    private static final long serialVersionUID = -7106262232964280928L;

    @ManyToOne
    @JoinColumn(name = "CORPORATION_ID")
    protected Corporation corporation;

    public Corporation getCorporation() {
        return corporation;
    }

    public void setCorporation(Corporation corporation) {
        this.corporation = corporation;
    }
}
